package own.stu.jobgib.playown.juc.activeObject;

import own.stu.jobgib.playown.juc.activeObject.service.ActiveObject;
import own.stu.jobgib.playown.juc.activeObject.service.Proxy;
import own.stu.jobgib.playown.juc.activeObject.service.Servant;

public class ActiveObjectFactory {
    public static ActiveObject create() {
        ActivationQueue queue = new ActivationQueue();
        SchedulerThread schedulerThread = new SchedulerThread(queue);
        Servant servant = new Servant();
        Proxy proxy = new Proxy(schedulerThread, servant);
        schedulerThread.start();
        return proxy;
    }
}
